package com.jiazhong.boot.ioc.mybatis;

import com.jiazhong.boot.ioc.mybatis.service.EmpService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableTransactionManagement
@Slf4j
@SpringBootApplication
public class BootIoCMybatisApplication {
    /*public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(BootIoCMybatisApplication.class, args);
        EmpService service = context.getBean(EmpService.class);
        JsonResult result = service.findAll();
        log.info("result: {}", result);
        log.info("number:{}", 1);
    }*/

    public static void main(String[] args) {
        SpringApplication.run(BootIoCMybatisApplication.class, args);
    }
}